# Creates an ACH payment method

<span class="api-endpoint">POST {{<a href="#urlbases">baseURL</a>}}/pay-api/v1/customers/{{customerId}}/payment-methods/ach</span>
This endpoint creates a payment method for EFT or ACH (automated clearing house) transactions.
<details>
<summary>The following is an example of the minimum call.</summary>
The endpoint call, with a fictitious customerId:

```html
POST {{baseURL}}/pay-api/v1/customers/019d2135-be3f-7310-8e03-0bece14c231b/payment-methods/ach
```
The endpoint request body:

```json
{
  "paymentMethodId": "123456789",
  "routingNumber": "123123123",
  "accountType": 1,
  "accountHolderType": 1
}
```
The return value is the paymentMethodId (payment method identifier).

```json
{
  "id": "ecb05a38-990a-46fb-9a37-b0359164d918"
}
```
</details>
<span class="api-seealso">See Also:</span><br>
To add a payment method for other transaction types, see `GET /pay-api/v1/customers/{{customerId}}/payment-methods`<br>
To update a payment method, see `PUT /pay-api/v1/customers/{{customerId}}/payment-methods/{{paymentMethodId}}`<br>
To delete a payment method, see `DELETE /pay-api/v1/customers/{{customerId}}/payment-methods/{{paymentMethodId}}`<br>
To set a default payment method, see `PUT /pay-api/v1/customers/{{customerId}}/payment-methods/{{paymentMethodId}}/make-default`<br>

Endpoint: POST /pay-api/v1/customers/{customerId}/payment-methods/ach
Version: V1
Security: Bearer

## Path parameters:

  - `customerId` (string, required)
    Specifies a single customer's identifier.

## Request fields (application/json):

  - `accountNumber` (string, required)
    Specifies the account number.

Example: 123456789
    Example: 123456789

  - `routingNumber` (string, required)
    Specifies the routing number.

Example: 123123123
    Example: 123123123

  - `accountType` (integer, required)
    Identifies the account type.
Possible values:
| Type ID | Account Type | Description |
|  --- | --- | --- |
| 1 | Checking | Checking |
| 2 | Savings | Savings |

Example: 1
    Example: 1

  - `accountHolderType` (integer, required)
    Identifies the account holder type.
Possible values:
| Type ID | Account Type | Description |
|  --- | --- | --- |
| 1 | Business | Business |
| 2 | Personal | Personal |

Example: 1
    Example: 1

  - `name` (string)
    Specifies the payment method name.

This is a free-formed name that is convenient for the merchant to recognize. 

Example: Peppared Street Cafe's Preferred Payment
    Example: Peppared Street Cafe's Preferred Payment

  - `taxId` (string)
    Specifies the customer's TIN (tax identifier number).

Example: 98-7654321
    Example: 98-7654321

## Response 200 fields (application/json):

  - `id` (string)
    Indicates the payment method identifier.
This is also known the `paymentMethodId`.
Example: db02ec6c-2e5a-4b87-98a0-8dd881707d84
    Example: db02ec6c-2e5a-4b87-98a0-8dd881707d84

## Response 400 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error
    Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

## Response 404 fields (application/json):

  - `details` (string)

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)

  - `exceptionType` (string)

  - `correlationId` (string)

  - `entityId` (string)

  - `errorCode` (string)

## Response 500 fields (application/json):

  - `details` (string)

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)

  - `exceptionType` (string)

  - `correlationId` (string)

  - `entityId` (string)

  - `errorCode` (string)

